#include "PointCloudFrame.hpp"

namespace aeye {

PointCloudFrame::PointCloudFrame() noexcept
    : frameId(0), tsSec(0), tsuSec(0), pointReturnFlags(0), numPointsReportedBySensor(0), sensor_pose({}) {}
PointCloudFrame::PointCloudFrame(std::string sensorIp, int frameId, uint16_t pointReturnMask,
                                 std::vector<AEyePoint> &&inPoints, size_t expectedNumPoints, uint32_t sec,
                                 uint32_t usec, Pose pose, std::string scan_pattern) noexcept:
    frameId(frameId),
    sensorIp(std::move(sensorIp)),
    tsSec(sec),
    tsuSec(usec),
    pointReturnFlags(pointReturnMask),
    points(std::move(inPoints)),
    numPointsReportedBySensor(expectedNumPoints),
    sensor_pose(pose),
    scan_pattern_name(std::move(scan_pattern)) {}
const std::vector<AEyePoint> &PointCloudFrame::getPoints() const { return points; }
uint16_t PointCloudFrame::getPointReturnFlags() const { return pointReturnFlags; }
const std::string &PointCloudFrame::getIpAddress() const { return sensorIp; }
std::string &PointCloudFrame::getIpAddress() { return sensorIp; }
int PointCloudFrame::getFrameId() const { return frameId; }
std::vector<AEyePoint> &PointCloudFrame::getPoints() { return points; }
uint32_t PointCloudFrame::getTimeSec() const { return tsSec; }
uint32_t PointCloudFrame::getTimeuSec() const { return tsuSec; }
size_t PointCloudFrame::getNumReceivedPoints() const { return points.size(); }
size_t PointCloudFrame::getNumExpectedPoints() const { return numPointsReportedBySensor; }
Pose PointCloudFrame::getSensorPose() const { return sensor_pose; }
const std::string &PointCloudFrame::getScanPatternUsed() const { return scan_pattern_name; }
}